package itdfq.dfq.Behavior_Patters.jieshiqi;

import java.util.HashMap;

/**
 * @Author GocChin
 * @Date 2021/5/15 13:02
 * @Blog: itdfq.com
 * @QQ: 909256107
 * @Descript:
 */
public class VarExpression extends Expression {

    private String key;

    public VarExpression(String key) {
        this.key = key;
    }

    @Override
    public int interpreter(HashMap<String, Integer> var) {
        return var.get(this.key);
    }

}